package com.liugh;/*
 * Copyright (C) 2018 royal Inc., All Rights Reserved.
 */

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/** 
 * @Description: 指定项目为springboot，由此类当作程序入口，自动装配 web 依赖的环境
 * @author liugh
 * @since 2018-05-03
 *
 */
//开启事务支持
@EnableTransactionManagement
@SpringBootApplication
//spring 组件扫描
@ComponentScan("com.liugh")
//mubatis plus 包扫描
@MapperScan("com.liugh.mapper")
//elasticSearch包扫描
@EnableElasticsearchRepositories(basePackages = "com.liugh.mapper")
//缓存支持
@EnableCaching
//异步支持
@EnableAsync
public class SpringbootApplication  {
	public static void main(String[] args) {
        SpringApplication.run(SpringbootApplication.class, args);
    }
}
